package huffmanTree;

import java.util.List;

/**
 * @author Aaron
 * @desc
 * @createTime 2021/12/31 13:29
 * @since
 */
public class SynchronizedHuffmanTree<T> extends AlterableHuffmanTree<T>  {

    public SynchronizedHuffmanTree(List<T> valueList) {
        super(valueList);
    }

    public SynchronizedHuffmanTree(T value) {
        super(value);
    }

    @Override
    public synchronized void addHuffmanTree(HuffmanTree<T> huffmanTree) {
        buildValueFrequencyWhenAddTree(huffmanTree);
        buildTree(huffmanTree);
        buildCompressDataWhenAddTree(huffmanTree);
    }


}

